<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .two {
        border-left: 5px solid greenyellow;
        height: 500px;
        width: 250px;
        position: absolute;
        right: 0;
    }

    #app {
        height: 500px;
        width: 514px;
        position: relative;
        border: 5px solid greenyellow;
        
    }

    .one {
        border: none;
        height: 500px;
        width: 250px;
        position: absolute;

    }
</style>

<body>
    <div id="app">
        <div class="box">
            <textarea class="one" v-model="val"></textarea>
        </div>
        <div class="two" v-html="mark">
        </div>
    </div>
</body>

</html>
<script src='https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js'></script>
<script src="https://cdn.bootcdn.net/ajax/libs/marked/1.2.7/marked.min.js"></script>
<script>
    let vm = new Vue({
        el: "#app",
        data: {
            val: "# 一级标题"
        },
        computed: {
            mark() {
                return marked(this.val);
            }
        }
    })
</script>